abs — Absolute Value


\begin{rail}
AbsoluteValue : 'abs' '(' ( Scalar \vert Matrix ) ')' ;
\end{rail}
abs returns the absolute value of the argument. It operates element-by-element for a matrix argument, returning a matrix result. Absolute value is defined as

$\displaystyle \left\{\vphantom{ \begin{array}{ll}
 -x & \mbox{if $x < 0$\ and $...
...qrt{\Re(x)^{2} + \Im(x)^{2}} & \mbox{if $x$\ is complex}
 \end{array}
 }\right.$$\displaystyle \begin{array}{ll}
 -x & \mbox{if $x < 0$\ and $x$\ is real} \\  
...
...} \\  
 \sqrt{\Re(x)^{2} + \Im(x)^{2}} & \mbox{if $x$\ is complex}
 \end{array}$



Subsections